//
//  SCStarScoreView.h
//  Shuaiche
//
//  Created by 党帅 on 2019/9/5.
//  Copyright © 2019 ShuaiChe. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol SCStarScoreViewDelegate <NSObject>

- (void)starScoreViewValueChanged:(CGFloat)score;

@end

NS_ASSUME_NONNULL_BEGIN

@interface SCStarScoreView : UIView
@property(nonatomic, assign) IBInspectable CGFloat itemSpace;
@property(nonatomic, assign) IBInspectable CGFloat itemWidth;     // size 1:1
@property(nonatomic, assign) NSInteger numberOfItems;
@property(nonatomic, assign) CGFloat score;         // [0,1]
@property(nonatomic, assign) BOOL editEnable;

@property (nonatomic, copy) NSString *normalImageName;
@property (nonatomic, copy) NSString *highlightImageName;

@property(nonatomic, weak) id<SCStarScoreViewDelegate> delegate;
@end

NS_ASSUME_NONNULL_END
